home *** CD-ROM | disk | FTP | other *** search
- ## -*-Tcl-*-
- # ==========================================================================
- # Mode Examples - a Help package for Alpha
- #
- # FILE: "Setext-Example.setx"
- # created: 10/17/00 {02:18:43 pm}
- # last update: 12/04/00 {03:29:36 pm}
- # Description:
- #
- # Script for the "Setext Example" in the Mode Examples package.
- #
- # Author: Craig Barton Upright
- # E-mail: <cupright@princeton.edu>
- # mail: Princeton University, Department of Sociology
- # Princeton, New Jersey 08544
- # www: <http://www.princeton.edu/~cupright>
- #
- # ==========================================================================
- ##
-
- set f [file join $HOME Help "Setext Help"]
- set m Setx
- new -n "* $m Mode Example *" -m $m -text [file::readAll $f] -shell 1
- goto [minPos]
- set t "\r $m mode example -- Modify as much as you like ! \r\r"
- append t " None of the changes you make will affect the actual file. If you close \r"
- append t " the window and then click on the hyperlink again, you will start with the \r"
- append t " same example as before. This also means that you cannot send this window \r"
- append t " to other applications -- technically, it doesn't exist as a file. \r\r"
- # Find out if there's a tutorial available for this mode.
- set f2 [file join ${HOME} Tcl Completions "Setx Tutorial"]
- if {[llength [glob -nocomplain -path $f2 *]] == 1} {
- append t " $m mode also has a Completions Tutorial in the Config --> Mode Prefs menu.\r\r"
- }
- insertText $t
- goto [minPos]
- # Now try to mark the file.
- markFile
-
- catch {unset f}
- catch {unset m}